package tp.Composition.model;


public class Cat implements Animal
{

    private int meowFrequency;
    private Mammal mammal;

    public Cat(int meowFrequency, Mammal mammal)
    {
        this.meowFrequency = meowFrequency;
        this.mammal = mammal;
    }

    public int getMeowFrequency()
    {
        return meowFrequency;
    }

    public void setMeowFrequency(int meowFrequency)
    {
        this.meowFrequency = meowFrequency;
    }

    public Mammal getMammal()
    {
        return mammal;
    }

    public void setMammal(Mammal mammal)
    {
        this.mammal = mammal;
    }

    @Override
    public void action()
    {
        for (int i = 0; i < getMeowFrequency(); i++)
        {
            System.out.println("Cat meowing");
        }
    }
}
